<?php
define ('GAMBLE_SMALL', 1);
define ('GAMBLE_LARGE', 2);
define ('GAMBLE_EVEN', 3);

$fund = 10000;

$ifwin = gamble(GAMBLE_SMALL);

//for ($i=0; $i<100; $i++)
//echo mt_rand(1, 6).' ';

function gamble($guess)
{
	$dice = array();
	for ($i=0; $i<3; $i++)
	{
		$dice[] = mt_rand(1, 6);
	}
	
	if (array_sum($dice) > 9
	echo sprintf("guess:%s	dice:%s %s",
		$guess==GAMBLE_SMALL ? 'small' : 'big',
		implode(',', $dice),
		);
}